<template>
  <el-dialog title="编辑" :modelValue="visiable" width="500" @closed="emit('closed')">
    <el-form :model="selectWire" label-width="80px" :inline="false" v-if="selectWire">
      <el-form-item label="名称">
        <el-input v-model="selectWire.wireName" disabled>
          <template #append>
            <Clue theme="outline" size="16" fill="#2980b9" />
          </template>
        </el-input>
      </el-form-item>

      <el-form-item label="型号">
        <el-input v-model="selectWire.wireStyle">
          <template #append>
            <Cube theme="outline" size="16" fill="#2980b9" />
          </template>
        </el-input>
      </el-form-item>

      <el-form-item>
        <el-button type="primary" @click="onSubmit">更新</el-button>
        <el-button @click="emit('closed')">取消</el-button>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script setup lang="ts">
import { wireModel } from '@/types/model'
import { Clue, Cube } from '@icon-park/vue-next'

defineProps<{
  visiable: boolean
  selectWire?: wireModel
}>()
const emit = defineEmits(['closed'])

const onSubmit = () => {}
</script>
